<script type="text/javascript">
        function logout(){
                $.post('{base_url}control/logout',function(){
                        $(location).attr('href', '{base_url}');
                });
        }
        </script>

<div style=" width: 140px; float: left;">
        Здравствуйте, <br /> <b>{surname} {firstname}</b>
</div>
<div style="width: 75px; margin-top: 5px;  float: right;">
        <input style="float: left;" type="button" id="logout" value="Выход" onClick="logout();" />
</div>